package com.neuedu.mblog.controller;

import com.neuedu.mblog.dao.UploadFileDao;
import com.neuedu.mblog.entiry.UploadFile;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 项目：his
 * 创建时间：  2021/12/16   10:39
 * 作者 :jshand
 * 描述 :
 * /file?_type=list
 */
@WebServlet(urlPatterns = "/file")
public class FileListController extends BaseController {
    @Override
    protected void list(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        List<UploadFile> list = new UploadFileDao().selectList(null);
        request.setAttribute("list", list);
        request.getRequestDispatcher("/WEB-INF/view/upload/upload_list.jsp").forward(request, response);
    }
}
